package lib.bone.system.domain.dto.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @Author : Kindear
 * @Date : 2021-11-29
 */

@Data
@ApiModel(value = "用户新增表单")
public class UserAddDTO {
    @NotNull(message = "部门ID不可为空")
    @ApiModelProperty("部门ID")
    private Long deptId;

//    @NotNull(message = "岗位ID不可为空")
//    @ApiModelProperty("岗位ID")
//    private Long postId;

    @NotBlank(message = "用户账号不可为空")
    @ApiModelProperty("用户账号")
    private String userName;

    @NotBlank(message = "用户昵称不可为空")
    @ApiModelProperty("用户昵称")
    private String nickName;

    @Pattern(regexp = "^[1][3,4,5,7,8][0-9]{9}$" , message = "电话号码有误")
    @ApiModelProperty("用户手机号")
    String phoneNumber;

    @NotBlank(message = "用户性别不可为空")
    @ApiModelProperty("用户性别")
    String sex;

    /** 用户邮箱 & 用户登录账号 **/
    @ApiModelProperty("用户邮箱")
    String email;

    @NotBlank(message = "用户登录密码不可为空")
    @ApiModelProperty("用户登录密码")
    String password;



}
